import { useLocation } from 'umi';
import { IframeMicro } from '@/components/IframeMicro';

export default function Page1() {
  const location = useLocation();

  const { pathname } = location;

  console.log({pathname});

  const microAppBasePath = "/app1";

  const currentPath = pathname.replace(microAppBasePath, "");

  return (
    <div style={{ height: 800, width: 500 }}>
      <IframeMicro activate={pathname.startsWith(microAppBasePath)} microApp="app1" path={currentPath} />
    </div>
  );
}
